Repository navigation
The embed at most 80% of the course's visible height (P53b) - #36
Merged
Merged
Conversation
The iframe gets the height the embed's content needs, at most 80% of the visible height of the element that scrolls the course (LiaScript's .lia-slide__container, else the window) minus the block's own rows, measured anew whenever that element or the block changes size (window, fullscreen, rotation, presentation mode, LiaScript's top bar). The fixed 1200px and the window height measured once at load are gone. "large": while visualizing, the embed is as tall as it may be. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P53b, the macro half. Merge after glpython-edu/glpython-editor#61, which deploys the embed that fills its iframe and reports its natural height. With today's embed, this macro would cut off a tall visualizer instead of scrolling it.
Change
fitHeightsets the iframe to min(the content's height fromglpython:resize, 80 % of the visible height − the block's own rows).clientHeightof the element that scrolls the course: the nearest ancestor withoverflow-y: auto|scroll, which is.lia-slide__containerin LiaScript; otherwise the window.glpython:resize, on window resize, and through aResizeObserveron the scrolling element and the block. That covers fullscreen, rotation, presentation mode, and LiaScript's top bar shown or hidden.windowHeight/visualizerHeightin the URL.large: while visualizing, the embed gets the full 80 %; otherwise it keeps its natural height. The embed now says whether it visualizes (visualizinginglpython:resize); with an older embed, onlyvisualblocks count as visualizing.visualblock still starts at its minimum (190 px;large: the maximum), and no minimum exceeds the maximum.large.Checks
check-macroandcheck:readypass. New cases incheck:ready, with a stand-in scrolling container:largegets its own height until it visualizes, then 80 %.🤖 Generated with Claude Code